{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e312e1c4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>x</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   x   y\n",
       "0  1   7\n",
       "1  2   9\n",
       "2  3  11\n",
       "3  4  13\n",
       "4  5  15"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#获取数据\n",
    "import pandas as pd\n",
    "data = pd.read_csv('generated_data.csv')\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ae09012f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0     1\n",
      "1     2\n",
      "2     3\n",
      "3     4\n",
      "4     5\n",
      "5     6\n",
      "6     7\n",
      "7     8\n",
      "8     9\n",
      "9    10\n",
      "Name: x, dtype: int64 0     7\n",
      "1     9\n",
      "2    11\n",
      "3    13\n",
      "4    15\n",
      "5    17\n",
      "6    19\n",
      "7    21\n",
      "8    23\n",
      "9    25\n",
      "Name: y, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "#data赋值\n",
    "x=data.loc[:,'x']\n",
    "y=data.loc[:,'y']\n",
    "print(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "986a3b93",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0MAAAMtCAYAAABdPqrFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3qElEQVR4nO3df5CedX3v/9edjWRTurltgM3uDgEX/IExiIIkB6EcGAIJpycVS3/AMUdQq3MyoS1GVOgUYo7YVHqOx6FgODpK7ESKdcYgodOdAwFDOQIRcnI0Jz0p4Cpw2E2ANLtJ7IbM7v39I99sWbMJ2bCbO9nP4zFzz3Bd9+e6eN8z6+jT+7qvq1Kr1WoBAAAozIR6DwAAAFAPYggAACiSGAIAAIokhgAAgCKJIQAAoEhiCAAAKJIYAgAAijSx3gOMhoGBgbz00ktpampKpVKp9zgAAECd1Gq17NixI21tbZkw4eDf/YyLGHrppZcyffr0eo8BAAAcJV544YWcfPLJB10zLmKoqakpyd4PPGXKlDpPAwAA1Etvb2+mT58+2AgHMy5iaN+lcVOmTBFDAADAIf18xg0UAACAIokhAACgSGIIAAAokhgCAACKJIYAAIAiiSEAAKBIYggAACiSGAIAAIokhgAAgCKJIQAAoEhiCAAAKJIYAgAAiiSGAACAIokhAACgSGIIAAAokhgCAACKJIYAAIAiiSEAAKBIYggAACiSGAIAAIokhgAAgCKJIQAAoEhiCAAAKJIYAgAAiiSGAACAIokhAACgSGIIAAAo0sR6DwAAABy7+gdqWde5LVt39KW5qTGz2qemYUKl3mMdEjEEAAAclo6NXVm6elO6evoG97VWG7Nk/ozMm9lax8kOzYguk1u2bFnOPffcNDU1pbm5OVdccUU2b948ZM1FF12USqUy5PWf/tN/Ouh5a7VabrnllrS2tmby5MmZM2dOnnnmmZF/GgAA4Ijo2NiVhSvXDwmhJOnu6cvClevTsbGrTpMduhHF0Nq1a7No0aI88cQTefDBB7Nnz55cdtll2bVr15B1n/zkJ9PV1TX4uu222w563ttuuy2333577rrrrjz55JM5/vjjM3fu3PT19R30OAAA4MjrH6hl6epNqQ3z3r59S1dvSv/AcCuOHiO6TK6jo2PI9ooVK9Lc3Jynn346F1544eD+X/u1X0tLS8shnbNWq+WrX/1q/uzP/iwf+tCHkiR//dd/nWnTpuW+++7LVVddtd8xu3fvzu7duwe3e3t7R/IxAACAN2Fd57b9vhF6vVqSrp6+rOvclvNOP+HIDTZCb+pucj09PUmSqVOnDtn/ne98JyeeeGJmzpyZm266Kb/85S8PeI7Ozs50d3dnzpw5g/uq1Wpmz56dxx9/fNhjli1blmq1OviaPn36m/kYAADACGzdcWhXcB3quno57BsoDAwM5Prrr8/555+fmTNnDu7/D//hP+TUU09NW1tbfvKTn+Tzn/98Nm/enO9///vDnqe7uztJMm3atCH7p02bNvjer7rpppuyePHiwe3e3l5BBAAAR0hzU+OorquXw46hRYsWZePGjXnssceG7P/Upz41+M9nnnlmWltbc8kll+S5557L6aeffviTvs6kSZMyadKkUTkXAAAwMrPap6a12pjunr5hfzdUSdJS3Xub7aPZYV0md9111+WBBx7II488kpNPPvmga2fPnp0kefbZZ4d9f99vi7Zs2TJk/5YtWw75d0cAAMCR0zChkiXzZyTZGz6vt297yfwZR/3zhkYUQ7VaLdddd11WrVqVhx9+OO3t7W94zIYNG5Ikra3D32e8vb09LS0tWbNmzeC+3t7ePPnkkznvvPNGMh4AAHC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u/N3f/V2+9a1v5cYbbxzpiACMov6BWpau3pTaMO/VklSSLF29KZfOaHHJHADHlDG5gcIPf/jDNDc3513velcWLlyYV1999YBrX3vttTz99NOZM2fOvw41YULmzJmTxx9/fNhjdu/end7e3iEvAMbGus5t+30j9Hq1JF09fVnXue3IDQUAo2DUY2jevHn567/+66xZsyZf/vKXs3bt2lx++eXp7+8fdv0rr7yS/v7+TJs2bcj+adOmpbu7e9hjli1blmq1OviaPn36aH8MAP5/W3ccOIQOZx0AHC1G/W5yV1111eA/n3nmmXnve9+b008/PT/84Q9zySWXjMq/46abbsrixYsHt3t7ewURwBhpbmoc1XUAcLQY8+cMnXbaaTnxxBPz7LPPDvv+iSeemIaGhmzZsmXI/i1bthzwd0eTJk3KlClThrwAGBuz2qemtdqYA/0aqJKktbr3NtsAcCwZ8xh68cUX8+qrr6a1tXXY94877ricc845WbNmzeC+gYGBrFmzJuedd95YjwfAG2iYUMmS+TOSZL8g2re9ZP4MN08A4Jgz4hjauXNnNmzYkA0bNiRJOjs7s2HDhjz//PPZuXNnPvvZz+aJJ57Iz3/+86xZsyYf+tCH8va3vz1z584dPMcll1ySO+64Y3B78eLF+cY3vpFvf/vb+cd//McsXLgwu3btGry7HAD1NW9ma5YvODst1aGXwrVUG7N8wdmZN3P4/8MLAI5mI/7N0FNPPZWLL754cHvfb3euueaaLF++PD/5yU/y7W9/O9u3b09bW1suu+yyfPGLX8ykSZMGj3nuuefyyiuvDG7/wR/8QV5++eXccsst6e7uzvve9750dHTsd1MFAOpn3szWXDqjJes6t2Xrjr40N+29NM43QgAcqyq1Wm24R0ccU3p7e1OtVtPT0+P3QwAAULCRtMGY/2YIAADgaCSGAACAIokhAACgSGIIAAAokhgCAACKJIYAAIAiiSEAAKBIYggAACiSGAIAAIokhgAAgCKJIQAAoEhiCAAAKJIYAgAAiiSGAACAIokhAACgSGIIAAAokhgCAACKJIYAAIAiiSEAAKBIYggAACiSGAIAAIokhgAAgCKJIQAAoEhiCAAAKJIYAgA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2jRojzxxBN58MEHs2fPnlx22WXZtWtXvUdjnPvxj3+c//7f/3ve+9731nsUxrF//ud/zvnnn5+3vOUt+fu///ts2rQp//W//tf8xm/8Rr1HYxz68pe/nOXLl+eOO+7IP/7jP+bLX/5ybrvttvzVX/1VvUdjnNi1a1fOOuus3HnnncO+f9ttt+X222/PXXfdlSeffDLHH3985s6dm76+viM86aHxnCGOOi+//HKam5uzdu3aXHjhhfUeh3Fq586dOfvss/O1r30tt956a973vvflq1/9ar3HYhy68cYb8z//5//MP/zDP9R7FArw7//9v8+0adPyzW9+c3DflVdemcmTJ2flypV1nIzxqFKpZNWqVbniiiuS7P1WqK2tLZ/5zGdyww03JEl6enoybdq0rFixIldddVUdpx2eb4Y46vT09CRJpk6dWudJGM8WLVqU3/qt38qcOXPqPQrj3P33358PfOAD+b3f+700Nzfn/e9/f77xjW/UeyzGqQ9+8INZs2ZN/umf/ilJ8r//9//OY489lssvv7zOk1GCzs7OdHd3D/nv1mq1mtmzZ+fxxx+v42QHNrHeA8DrDQwM5Prrr8/555+fmTNn1nscxql7770369evz49//ON6j0IBfvazn2X58uVZvHhx/vRP/zQ//vGP88d//Mc57rjjcs0119R7PMaZG2+8Mb29vTnjjDPS0NCQ/v7+fOlLX8pHPvKReo9GAbq7u5Mk06ZNG7J/2rRpg+8dbcQQR5VFixZl48aNeeyxx+o9CuPUCy+8kD/5kz/Jgw8+mMbGxnqPQwEGBgbygQ98IH/+53+eJHn/+9+fjRs35q677hJDjLq//du/zXe+853cc889ec973pMNGzbk+uuvT1tbm783GIbL5DhqXHfddXnggQfyyCOP5OSTT673OIxTTz/9dLZu3Zqzzz47EydOzMSJE7N27drcfvvtmThxYvr7++s9IuNMa2trZsyYMWTfu9/97jz//PN1mojx7LOf/WxuvPHGXHXVVTnzzDPzH//jf8ynP/3pLFu2rN6jUYCWlpYkyZYtW4bs37Jly+B7RxsxRN3VarVcd911WbVqVR5++OG0t7fXeyTGsUsuuSQ//elPs2HDhsHXBz7wgXzkIx/Jhg0b0tDQUO8RGWfOP//8/R4X8E//9E859dRT6zQR49kvf/nLTJgw9H/eNTQ0ZGBgoE4TUZL29va0tLRkzZo1g/t6e3vz5JNP5rzzzqvjZAfmMjnqbtGiRbnnnnvygx/8IE1NTYPXlFar1UyePLnO0zHeNDU17fd7tOOPPz4nnHCC36kxJj796U/ngx/8YP78z/88v//7v59169bl61//er7+9a/XezTGofnz5+dLX/pSTjnllLznPe/J//pf/ytf+cpX8vGPf7zeozFO7Ny5M88+++zgdmdnZzZs2JCpU6fmlFNOyfXXX59bb70173jHO9Le3p6bb745bW1tg3ecO9q4tTZ1V6lUht1/991359prrz2yw1Ckiy66yK21GVMPPPBAbrrppjzzzDNpb2/P4sWL88lPfrLeYzEO7dixIzfffHNWrVqVrVu3pq2tLVdffXVuueWWHHfccfUej3Hghz/8YS6++OL99l9zzTVZsWJFarValixZkq9//evZvn17Lrjggnzta1/LO9/5zjpM+8bEEAAAUCS/GQIAAIokhgAAgCKJIQAAoEhiCAAAKJIYAgAAiiSGAACAIokhAACgSGIIAAAokhgCAACKJIYAAIAiiSEAAKBI/x/TSxESkftvswAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 1000x1000 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#展示数据\n",
    "from matplotlib import pyplot as plt\n",
    "plt.figure(figsize = (10,10))\n",
    "plt.scatter(x,y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "02249e97",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 创建线性回归模型\n",
    "from sklearn.linear_model import LinearRegression\n",
    "lr_model = LinearRegression()\n",
    "\n",
    "#sklearn需要2维数组\n",
    "#将[1,2,3,4]转为[[1,2,3,4]]\n",
    "import numpy as np\n",
    "x = np.array(x)\n",
    "x = x.reshape(-1,1)\n",
    "\n",
    "y = np.array(y)\n",
    "y = y.reshape(-1,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "437cfd63",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>#sk-container-id-1 {color: black;background-color: white;}#sk-container-id-1 pre{padding: 0;}#sk-container-id-1 div.sk-toggleable {background-color: white;}#sk-container-id-1 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-container-id-1 label.sk-toggleable__label-arrow:before {content: \"▸\";float: left;margin-right: 0.25em;color: #696969;}#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-container-id-1 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-container-id-1 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-container-id-1 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: \"▾\";}#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-container-id-1 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-container-id-1 div.sk-estimator:hover {background-color: #d4ebff;}#sk-container-id-1 div.sk-parallel-item::after {content: \"\";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-serial::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: 0;}#sk-container-id-1 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;position: relative;}#sk-container-id-1 div.sk-item {position: relative;z-index: 1;}#sk-container-id-1 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;position: relative;}#sk-container-id-1 div.sk-item::before, #sk-container-id-1 div.sk-parallel-item::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: -1;}#sk-container-id-1 div.sk-parallel-item {display: flex;flex-direction: column;z-index: 1;position: relative;background-color: white;}#sk-container-id-1 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-container-id-1 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-container-id-1 div.sk-parallel-item:only-child::after {width: 0;}#sk-container-id-1 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;}#sk-container-id-1 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;}#sk-container-id-1 div.sk-label-container {text-align: center;}#sk-container-id-1 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-container-id-1 div.sk-text-repr-fallback {display: none;}</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>LinearRegression()</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" checked><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label sk-toggleable__label-arrow\">LinearRegression</label><div class=\"sk-toggleable__content\"><pre>LinearRegression()</pre></div></div></div></div></div>"
      ],
      "text/plain": [
       "LinearRegression()"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#设置函数参数\n",
    "lr_model.fit(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "ed2e066b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 7.]\n",
      " [ 9.]\n",
      " [11.]\n",
      " [13.]\n",
      " [15.]\n",
      " [17.]\n",
      " [19.]\n",
      " [21.]\n",
      " [23.]\n",
      " [25.]]\n"
     ]
    }
   ],
   "source": [
    "#尝试获取预测值\n",
    "y_predict = lr_model.predict(x)\n",
    "print(y_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "f94dcd55",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[12.]]\n"
     ]
    }
   ],
   "source": [
    "#获取预测值\n",
    "y_3 = lr_model.predict([[3.5]])\n",
    "print(y_3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9f0161a8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[2.]] [5.]\n"
     ]
    }
   ],
   "source": [
    "#打印a,b\n",
    "a = lr_model.coef_\n",
    "b = lr_model.intercept_\n",
    "print(a,b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "0ecd1b23",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.4909471108677122e-29 1.0\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import mean_squared_error,r2_score\n",
    "#判断均方误差（MSE），越小越好\n",
    "MSE = mean_squared_error(y,y_predict)\n",
    "#判断R2分数，越接近1越好\n",
    "R2 = r2_score(y,y_predict)\n",
    "print(MSE,R2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "bddc5f87",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAGdCAYAAAAxCSikAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAw2UlEQVR4nO3dfVCU973//9eCyhoDa1Fhl4qKptEQjKkeoSTmrqLiyRBNbBttPGrunHAwrTU3xkwjUnOG1mRy8k3iIZ1OlHTIXXNGjCRz6HifeqJSJUxCbBnlbDSOuxj1sIsYkLLX7w9/7HGFRRZh9wKej5lrxuu6PtfH98eLm5fXzWcthmEYAgAAMLGoSBcAAABwNQQWAABgegQWAABgegQWAABgegQWAABgegQWAABgegQWAABgegQWAABgeoMiXUBP8Pl8OnXqlGJjY2WxWCJdDgAA6ALDMNTQ0KCkpCRFRXV+DaVfBJZTp04pOTk50mUAAIBu+OabbzR69OhO2/SLwBIbGyvp0oDj4uIiXA0AAOgKr9er5ORk/+/xzvSLwNJ2GyguLo7AAgBAH9OVxzl46BYAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJhev5g4DgAA9I5Wn6EK5zmdbmhSQqxV6Snxio4K/+f2hXSFpbCwUNOnT1dsbKwSEhI0f/581dTUBLS5++67ZbFYApYnnnii034Nw9DatWvlcDg0dOhQZWVl6ejRo6GPBgAA9Jjyapdm/G6XFv3hgH75fpUW/eGAZvxul8qrXWGvJaTAsnfvXuXl5enAgQPavn27WlpaNHv2bDU2Nga0e/zxx+VyufzLhg0bOu13w4YNeu211/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IUFdX5Uyr94gpLVFSURo8eHeky2omLixtwX9TSwB23NHDHPlDHLTH2gTj2gTpuqXfGfrUrK2146BYAAJgegQUAAJgegaUXxMTEKD8/XzExMZEuJawG6rilgTv2gTpuibEPxLEP1HFL5hh7v3joFgAA9G9cYQEAAKZHYAEAAKZHYAEAAKZHYAEAAKZHYAnRuHHjZLFY2i15eXkdti8uLm7X1mq1hrnq0H366afKyclRUlKSLBaLtm7dGrDfMAytXbtWDodDQ4cOVVZWlo4ePXrVfjdu3Khx48bJarUqIyNDFRUVvTSC7uts7C0tLVq9erUmT56sYcOGKSkpSUuWLNGpU6c67XPdunXtvg4mTZrUyyMJ3dXO+7Jly9qNIzs7+6r9mv28X23cHX3PWywWvfTSS0H77AvnvLCwUNOnT1dsbKwSEhI0f/581dTUBLRpampSXl6eRowYoeuvv14LFixQXV1dp/129+dDOF1t7OfOndOTTz6piRMnaujQoRozZox+8YtfyOPxdNpvd79Hwqkr5/3uu+9uN44nnnii0357+7wTWEL017/+VS6Xy79s375dkvTTn/406DFxcXEBxxw/fjxc5XZbY2OjpkyZoo0bN3a4f8OGDXrttdf05ptv6uDBgxo2bJjmzJmjpqamoH1+8MEHWrVqlfLz81VZWakpU6Zozpw5On36dG8No1s6G/uFCxdUWVmpF154QZWVldqyZYtqamp03333XbXfm2++OeDrYN++fb1R/jW52nmXpOzs7IBxvPfee5322RfO+9XGffl4XS6XNm3aJIvFogULFnTar9nP+d69e5WXl6cDBw5o+/btamlp0ezZs9XY2Ohv86tf/UplZWX68MMPtXfvXp06dUoPPPBAp/125+dDuF1t7KdOndKpU6f08ssvq7q6WsXFxSovL9ejjz561b5D/R4Jt66cd0l6/PHHA8axYcOGTvvt9fNu4Jr88pe/NCZMmGD4fL4O92/evNmw2WzhLaqHSTJKS0v96z6fz7Db7cZLL73k31ZfX2/ExMQY7733XtB+0tPTjby8PP96a2urkZSUZBQWFvZK3T3hyrF3pKKiwpBkHD9+PGib/Px8Y8qUKT1bXC/raOxLly415s2bF1I/fe28d+Wcz5s3z/jxj3/caZu+eM5Pnz5tSDL27t1rGMal7+vBgwcbH374ob/N3/72N0OSsX///g776O7Ph0i7cuwd+dOf/mQMGTLEaGlpCdqmO98jkdbR2O+66y7jl7/8ZZf7CMd55wrLNbh48aJKSkr0yCOPdPqhi+fPn9fYsWOVnJysefPm6auvvgpjlT3P6XTK7XYrKyvLv81msykjI0P79+/v8JiLFy/q8OHDAcdERUUpKysr6DF9hcfjkcVi0fDhwzttd/ToUSUlJWn8+PF66KGHdOLEifAU2MP27NmjhIQETZw4Ubm5uTp79mzQtv3xvNfV1emTTz7p0v+0+9o5b7vdER8fL0k6fPiwWlpaAs7fpEmTNGbMmKDnrzs/H8zgyrEHaxMXF6dBgzr/GL5QvkfMINjY33nnHY0cOVJpaWlas2aNLly4ELSPcJz3fvHhh5GydetW1dfXa9myZUHbTJw4UZs2bdItt9wij8ejl19+Wbfddpu++uorU35gY1e43W5JUmJiYsD2xMRE/74rnTlzRq2trR0e8/e//713Cg2DpqYmrV69WosWLer0A8EyMjJUXFysiRMnyuVyqaCgQHfccYeqq6sVGxsbxoqvTXZ2th544AGlpKSotrZWzz//vObOnav9+/crOjq6Xfv+eN7ffvttxcbGXvW2SF875z6fTytXrtTtt9+utLQ0SZe+14cMGdIujHf2vd6dnw+R1tHYr3TmzBmtX79ey5cv77SvUL9HIi3Y2H/+859r7NixSkpK0hdffKHVq1erpqZGW7Zs6bCfcJx3Ass1eOuttzR37lwlJSUFbZOZmanMzEz/+m233aabbrpJv//977V+/fpwlIle0tLSop/97GcyDENFRUWdtp07d67/z7fccosyMjI0duxY/elPf+rS/9TNYuHChf4/T548WbfccosmTJigPXv2aObMmRGsLHw2bdqkhx566KoPz/e1c56Xl6fq6mrTPWcTDlcbu9fr1b333qvU1FStW7eu07762vdIsLFfHswmT54sh8OhmTNnqra2VhMmTAh3mZJ46Lbbjh8/rh07duixxx4L6bjBgwfrhz/8oY4dO9ZLlfU+u90uSe3eFKirq/Pvu9LIkSM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akdkvb2Hw+n/HCCy8YiYmJRkxMjDFz5sx2/x5jx4418vPzA7a9/vrr/n+P9PR048CBA2EaUdd1Nnan09nhPknG7t27/X1cOfYHH3zQcDgcxpAhQ4zvf//7xoMPPmgcO3Ys/IO7is7GfuHCBWP27NnGqFGjjMGDBxtjx441Hn/88XbBoy+e96t9vRuGYfz+9783hg4datTX13fYR18858G+ljdv3uxv89133xn/+q//anzve98zrrvuOuP+++83XC5Xu34uP6YrPx8i7WpjD/Y1IclwOp0B/bQd09XvkUi72thPnDhh3HnnnUZ8fLwRExNj3HDDDcYzzzxjeDyedv2E87xb/v+/FAAAwLR4hgUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJgegQUAAJje/wfD/ZvRK9yfQwAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#图像展示\n",
    "plt.figure()\n",
    "plt.plot(y,y_predict)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "df7cfc04",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
